// 自动生成模板PluginOrder
package plugin_market

import (
	"gitcode.com/G-YT/ANN/server/global"
	"time"
)

// 插件订单管理 结构体  PluginOrder
type PluginOrder struct {
	global.GVA_MODEL
	OrderNo    *string    `json:"order_no" form:"order_no" gorm:"index;comment:订单号;column:order_no;size:100;"`                                  //订单号
	UserId     *int       `json:"user_id" form:"user_id" gorm:"comment:用户ID;column:user_id;" binding:"required"`                                //用户ID
	PluginId   *int       `json:"plugin_id" form:"plugin_id" gorm:"comment:插件ID;column:plugin_id;" binding:"required"`                          //插件ID
	Amount     *float64   `json:"amount" form:"amount" gorm:"comment:订单金额(元);column:amount;" binding:"required"`                                //订单金额
	PayStatus  string     `json:"pay_status" form:"pay_status" gorm:"default:1;comment:支付状态;column:pay_status;type:enum();" binding:"required"` //支付状态
	PayMethod  string     `json:"pay_method" form:"pay_method" gorm:"comment:支付方式;column:pay_method;type:enum();"`                              //支付方式
	PayTime    *time.Time `json:"pay_time" form:"pay_time" gorm:"comment:支付时间;column:pay_time;"`                                                //支付时间
	ExpireTime *time.Time `json:"expire_time" form:"expire_time" gorm:"comment:过期时间;column:expire_time;"`                                       //过期时间
	Remark     *string    `json:"remark" form:"remark" gorm:"comment:备注;column:remark;size:500;"`                                               //备注
	CreatedBy  uint       `gorm:"column:created_by;comment:创建者"`
	UpdatedBy  uint       `gorm:"column:updated_by;comment:更新者"`
	DeletedBy  uint       `gorm:"column:deleted_by;comment:删除者"`
}

// TableName 插件订单管理 PluginOrder自定义表名 plugin_orders
func (PluginOrder) TableName() string {
	return "plugin_orders"
}
